<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>CharTable</title>
<meta http-equiv="Content-Type" Content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="../../styles/styles.css">
<script language="javascript" src='../links.js' type="text/javascript"></script>
</head>
<body>

<h1>CharTable</h1>
<div class=navbar>
<a href="../index.html">main</a> |
<a href="index.html">service functions</a>
</div>

<div class=shortdescr>
The <dfn>CharTable</dfn> function allows to get information about installed character
tables.
</div>

<pre class=syntax>
int WINAPI CharTable(
  int Command,
  char *Buffer,
  int BufferSize
);
</pre>

<h3>Parameters</h3>
<div class=descr>
  <div class=dfn>Command</div>
  <div class=dfndescr>Either the number of the requested character table or one of the following
  commands (the <a name="FARCHARTABLE_COMMAND">FARCHARTABLE_COMMAND</a> enum):

  <table class="cont">
  <tr class="cont"><th class="cont" width="40%">Command</th><th class="cont" width="60%">Description</th></tr>
    <tr class="cont"><td class="cont" width="40%"><a name="FCT_DETECT">FCT_DETECT</a></td>
    <td class="cont" width="60%">Autodetect the character table for given text</td></tr>
  </table>
  </div>
  <div class=dfn>Buffer</div>
  <div class=dfndescr>If <em>Command</em> is equal to <dfn>FCT_DETECT</dfn>, specifies the address
    of a buffer with text data. Otherwise, specifies the address of a
    <a href="../structures/chartableset.html">CharTableSet</a> structure that receives information
    about the requested character table.
  </div>
  <div class=dfn>BufferSize</div>
  <div class=dfndescr>If <em>Command</em> is <dfn>FCT_DETECT</dfn>, <em>BufferSize</em> should
  contain the size of the buffer with text data to analyze. Otherwise it is the size of the
  <a href="../structures/chartableset.html">CharTableSet</a> structure.
  </div>
</div>

<h3>Return value</h3>
<div class=descr>
-1, if the requested table is not present or autodetection failed.<br>
If successful, the function returns the number of the requested table and fills the structure
pointed by <dfn>Buffer</dfn>. In <dfn>FCT_DETECT</dfn> mode it returns the number of the detected
table and does not change <dfn>Buffer</dfn> data.
</div>

<h3>Remarks</h3>
<div class=descr>
<ol>
<li>To enumerate all FAR character tables, start with <dfn>Command</dfn> equal
to 0 and increment it until the return value will be -1.
<li>The <a href="../structures/chartableset.html">CharTableSet</a> structure is filled with OEM
data if there where problems while reading settigs of some table (when <em>Command</em> does not
equals FCT_DETECT).
</ol>
</div>

</body>
</html>
